#pragma once
class Worker
{
public:

	enum State { Started, Stopping, Stopped };

	Worker(void);
	~Worker(void);

	void Start(void);
	void Stop(void);

	virtual void OnRun(void) = 0;

	bool IsStopping(void) const { return _State == Stopping; }
	void Join(void);

private:
	static void _run(void * data);
	State _State;
	uintptr_t _hThread;
};

